package com.liumingtai.demo01.redis.controller;

import com.liumingtai.demo01.common.utils.R;
import com.liumingtai.demo01.redis.feign.EmailFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;


@RestController
@RequestMapping("/web")
public class WebController {

    @Autowired
    EmailFeign emailFeign;

    @PostMapping("/email")
    public R sendEmail(@RequestBody HashMap object) {
        return R.ok(emailFeign.sendEmail(object));
    }
}
